package com.qushiyun.devops.admin.sync.data.mapstrcut;

import com.qushiyun.devops.admin.sync.data.po.TriggerJob;
import com.qushiyun.devops.admin.sync.data.vo.TriggerJobSelectVO;
import java.util.List;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface TriggerJobConverter {

    TriggerJobConverter INSTANCE = Mappers.getMapper(TriggerJobConverter.class);

    @Mapping(target = "value", source = "id")
    @Mapping(target = "label", source = "name")
    TriggerJobSelectVO convert(TriggerJob job);

    List<TriggerJobSelectVO> convert(List<TriggerJob> list);
}
